package org.example.bean;

/**
 * 对应数据库表结构，存储每年电影上映数量和总投票数信息
 */
public class MovieReleaseCount {
    // 上映年份，对应数据库 release_year 字段，类型为 int（接收 year 类型数据）
    private int releaseYear;
    // 当年上映电影数，对应数据库 movie_count 字段，类型为 int
    private int movieCount;
    // 总投票数，对应数据库 total_votes 字段，类型为 int
    private int totalVotes;

    public MovieReleaseCount() {
    }

    public MovieReleaseCount(int releaseYear, int movieCount, int totalVotes) {
        this.releaseYear = releaseYear;
        this.movieCount = movieCount;
        this.totalVotes = totalVotes;
    }

    // Getter 和 Setter 方法
    public int getReleaseYear() {
        return releaseYear;
    }

    public void setReleaseYear(int releaseYear) {
        this.releaseYear = releaseYear;
    }

    public int getMovieCount() {
        return movieCount;
    }

    public void setMovieCount(int movieCount) {
        this.movieCount = movieCount;
    }

    public int getTotalVotes() {
        return totalVotes;
    }

    public void setTotalVotes(int totalVotes) {
        this.totalVotes = totalVotes;
    }

    @Override
    public String toString() {
        return "MovieReleaseCount{" +
                "releaseYear=" + releaseYear +
                ", movieCount=" + movieCount +
                ", totalVotes=" + totalVotes +
                '}';
    }
}